/**
 * role/role
 * =======================================
 * list
 * edit
 * remove
 * view
 */

import request from '@/utils/request'

// list
export function list(data) {
  return request({
    url: '/api/uni/role/role/list',
    method: 'post',
    data
  })
}

// edit
export function edit(data) {
  return request({
    url: '/api/uni/role/role/edit',
    method: 'post',
    data
  })
}

// remove
export function remove(data) {
  return request({
    url: '/api/uni/role/role/remove',
    method: 'post',
    data
  })
}

// view
export function view(data) {
  return request({
    url: '/api/uni/role/role/view',
    method: 'post',
    data
  })
}

// ------------------------------------------------

// menu list
export function menuList(data) {
  return request({
    url: '/api/uni/role/role/menu-list',
    method: 'post',
    data
  })
}

// save menu
export function saveMenu(data) {
  return request({
    url: '/api/uni/role/role/menu-save',
    method: 'post',
    data
  })
}

// ------------------------------------------------

// find role
export function findRole(data) {
  return request({
    url: '/api/uni/role/role/role-by-menu',
    method: 'post',
    data
  })
}

// all role
export function allRole(data) {
  return request({
    url: '/api/uni/role/role/all-roles',
    method: 'post',
    data
  })
}
